#ifndef __UIANIMATION_H_
#define __UIANIMATION_H_

#define _Style_Animation_Bk_				0
#define enAnimationDefaultTimerID		0
class DUI_API CAnimationUI:public CControlUI
{
public:
	CAnimationUI();
	virtual ~CAnimationUI();
	static CControlUI* CreateObject();

public:
	ImageObj* GetImage();
	virtual void SetImage(LPCTSTR lpszImage);
	virtual void SetImage(ImageObj* pImageRender);
	virtual void SetAttribute(LPCTSTR lpszName, LPCTSTR lpszValue);
	virtual void SetInternVisible(bool bShow);
	void StopAnimation();
	void StartAnimation();
	void SetLoop(bool bLoop);
protected:
	virtual bool Event(TEventUI& event);
	virtual void Render(HDC& hDestDC, RECT& rcPaint);
	tstring m_strImageFile;
	UINT m_nFrameCount;
	UINT m_nActiveFrame;
	UINT m_nTimerElapse;
	int m_nFrameDelay;
	bool m_bInitAnimation;
	bool m_bLoop;
};
#endif